#ifndef _MISSING_OPS_HPP
#define _MISSING_OPS_HPP 1

#include <vector>
#include "MacArrayMessage.hpp"

namespace BFT
{
	namespace order
	{
		namespace messages
		{
			class MissingOps : public BFT::messages::MacArrayMessage
			{
				public:
				
				MissingOps(uint32_t _view, std::vector<uint32_t> _missingops, uint32_t _sendingReplica);
				
				MissingOps(boost::shared_ptr<char> _bytes, int _bytes_size);
				
				bool equals(boost::shared_ptr<MissingOps> _other_mo);
				
				uint32_t getView(); //inlined
				
				std::vector<uint32_t> getMissingOps(); //inlined
				
				uint32_t getSendingReplica(); //inlined
				
				protected:
				
				uint32_t viewNo;
				
				std::vector<uint32_t> missingOps;
				
				private:
				
				static uint32_t computeSize(unsigned int _opsnumber);
			};
			
			inline uint32_t MissingOps::getView() {return viewNo;}
			inline std::vector<uint32_t> MissingOps::getMissingOps() {return missingOps;}	
			inline uint32_t MissingOps::getSendingReplica() {return getSender();}
		}
	}
}


#endif
